#!/usr/bin/env python

import pygtk
pygtk.require('2.0')
import pynotify
import sys
import gtk
import os

if __name__ == '__main__':
	if not pynotify.init("Wifi status"):
		sys.exit(1)

	# Image URI
	uri = "file:///usr/share/icons/gnome/scalable/apps/gnome-monitor.svg"

	if sys.argv[1] == "off":
		n = pynotify.Notification("CPU Frequency", "Your cpu is now <b><span color='red'>downclocked</span></b> to 600Mhz. This reduces power consumption and extends hardware life. Press <i>Fn-F6</i> to enable overclocking.", uri)
	elif sys.argv[1] == "on":
		n = pynotify.Notification("CPU Frequency", "Your cpu is now <b><span color='blue'>overclocked</span></b> to 900Mhz. This improves performance and increase heat generation. You can disble it by pressing <i>Fn-F6</i>.", uri)
	else:
		print "USAGE: "+sys.argv[0]+" (on|off)"
		sys.exit(1)
		
	n.set_timeout(2000)
	if not n.show():
		print "Failed to send notification"
		sys.exit(1)

